﻿using System;

namespace Jayden.Dll.Core.Persistence
{
	public class ObjectType
	{
		private string m_Name;

		public ObjectType(string name)
		{
			if (name == null)
				throw new ArgumentNullException("name");
			m_Name = name;
		}

		public string Name { get { return m_Name; } }

		public override string ToString() { return m_Name; }
		public override int GetHashCode() { return m_Name.GetHashCode(); }
		public override bool Equals(object obj)
		{
			if (!(obj is ObjectType))
				return false;
			ObjectType ot = obj as ObjectType;
			return m_Name.Equals(ot.Name);
		}
	}
}
